package org.wanda.pv.model.basic;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.nutz.dao.entity.annotation.*;
import org.wanda.pv.framework.base.BaseModel;

import java.util.List;

@Table("wd_top_point")
@Comment("一级要点")
public class TopPoint extends BaseModel{
    @Column
    @Id
    @Prev(els = {@EL("$me.idGen()")})
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;


    @Comment("序号")
    @Column
    private String number;



    @Column
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String name;


    //----设计系统
    @Comment
    @Column("system_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long systemId;

    //设计系统关联
    @One(field = "systemId")
    private System system;

    @Comment
    @Column("specialty_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specialtyId;

    @One(field = "specialtyId")
    private Specialty specialty;


    @Many(field = "topPointId")
    private List<Point> points;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getSystemId() {
        return systemId;
    }

    public void setSystemId(Long systemId) {
        this.systemId = systemId;
    }

    public System getSystem() {
        return system;
    }

    public void setSystem(System system) {
        this.system = system;
    }

    public Long getSpecialtyId() {
        return specialtyId;
    }

    public void setSpecialtyId(Long specialtyId) {
        this.specialtyId = specialtyId;
    }

    public Specialty getSpecialty() {
        return specialty;
    }

    public void setSpecialty(Specialty specialty) {
        this.specialty = specialty;
    }

    public List<Point> getPoints() {
        return points;
    }

    public void setPoints(List<Point> points) {
        this.points = points;
    }
}
